{% include 'partials/license.j2' %}

FROM {{ base_image }}

{% include 'partials/nix-env.j2' %}

RUN set -eux; \
    microdnf install -y \
        gzip \
        tar \
        # Required for jlink
        binutils \
        tzdata \
        wget \
        # utilities for keeping UBI and OpenJDK CA certificates in sync
        # https://github.com/adoptium/containers/issues/293
        ca-certificates \
        # Needed to extract CN and generate aliases for certificates
        openssl \
        # java.lang.UnsatisfiedLinkError: libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
        # java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
        # https://github.com/docker-library/openjdk/pull/235#issuecomment-424466077
        fontconfig \
        glibc-langpack-en \
        # Required for gpg in multi-arch-install
        gnupg2 \
    ; \
    microdnf clean all

{% include 'partials/java-version.j2' %}

{% include 'partials/multi-arch-install.j2' %}

{% include 'partials/version-check.j2' %}
{% include 'partials/entrypoint.j2' %}
{% include 'partials/jshell.j2' %}
